package com.course.file.controller.admin;

import com.course.file.controller.BaseController;
import com.course.model.dto.FileDto;
import com.course.model.dto.PageDto;
import com.course.common.response.BaseResponse;
import com.course.model.util.ValidatorUtil;
import com.course.model.service.FileService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/admin/file")
public class FileController extends BaseController {

    public static final String BUSINESS_NAME = "文件";

    @Resource
    private FileService fileService;

    /**
     * 列表查询
     */
    @PostMapping("/getFileList")
    public BaseResponse list(@RequestBody PageDto pageDto) {
        BaseResponse response = new BaseResponse().sucess();
        fileService.list(pageDto);
        response.setData(pageDto);
        return response;
    }

}
